import { http } from '@/utils/http'

export const getrequirement = (id) => {
  return http({
    url: `/api/raw-material/pick-requirements/by-requirement/${id}/details`,
    method: 'get',
  })
}

export const addOrEditessaveRequisition = (id,data) => {
  return http({
    url: `/api/raw-material/pick-requirements/${id}/details/save-and-submit`,
    method: 'post',
    data
  })
}
//生产领料详情中领料单中的领取明细删除接口
export function materialsRequisitionDelete(data) {
  return http({
    url: `/api/raw-material/pick-requirements/delete`,
    method: "post",
    data
  });
}
//扫码接口
export const saomarequest = (detailCode) => {
  return http({
    url: `/api/raw-material-inventory-detail/by-detail-code/${detailCode}`,
    method: 'get',
  })
}

//生产领料，领料确认和出库确认提交接口
export function pickRequirementsworkflowsubmit(id,data) {
  return http({
    url: `/api/raw-material/pick-requirements/${id}/workflow/submit`,
    method: "post",
    data
  });
}